import Vue from 'vue'
import VueRouter from 'vue-router'
// 一级路由
import music from '../views/music.vue'
import video from '../views/video.vue'

import searchd from '../components/searchd.vue'
// music二级路由
import dation from '../views/music/dation/index'
import playlist from '../views/music/playlist/index'
import station from '../views/music/station/index'
import list from '../views/music/list/index'
import singer from '../views/music/singer/index'
import latest from '../views/music/latest/index'
import details from '../components/nav/details.vue'
// video二级路由
import mv from '../views/video/mv.vue'
import mv2 from '../views/video/mv2.vue'
import video01 from '../views/video/index.vue'
import video02 from '../views/video/index2.vue'
import singer2 from '../components/singer.vue'
// 懒加载
Vue.use(VueRouter)
const Router = new VueRouter({
	routes: [{
		path: '/music',
		component: music,
		children: [{
			path: 'dation',
			component: dation
		},
		{
			path: 'playlist',
			component: playlist
		},
		{
			path: 'station',
			component: station
		},
		{
			path: 'list',
			component: list
		},
		{
			path: 'singer',
			component: singer
		},
		{
			path: 'latest',
			component: latest
		},
		{
			path: '*',
			redirect: dation
		}
		]
	},{
		

			name: 'default',
			path: '*',
		redirect: '/music/dation'
		

	}, {
		path: '/video',
		component: video,
		children: [{
			path: 'mv',
			component: mv
		}, {
			path: 'video',
			component: video01
		}]
	}, {
		path: '/searchd',
		component: searchd
	},
	{
		path: '/mv2',
		component: mv2
	}, {
		path: '/video2',
		component: video02
	}, {
		path: '/details',
		component: details
	}, {
		path: '/singer2',
		name: 'singer2',
		component: singer2
	}]
})

export default Router
